<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>e</title> 
<link rel="stylesheet" type="text/css" href="../css/jpetstore.css"/> 
 </head>
  <body>
  		<div id="Header">
			<div id="Logo">
				<a href="../common/Main.jsp">
					<img src="../images/logo-topbar.gif" />
				</a>
			</div>
			<div id="Menu">
				<a href="../shop/viewCart.shtml">
					<img align="middle" name="img_cart" src="../images/cart.gif" />
				</a>
				<img align="middle" src="../images/separator.gif" />
				<a href="../common/zhanghu.jsp">我的账户</a>
				<img align="middle" src="../images/separator.gif" />
				<a href="../common/help.jsp">帮助</a>
			</div>
			<div id="Search">
				<form method="get" action=" ../shop/searchProducts.shtml ">
				<input type="text" name="KeyWord " size="14">&nbsp;
				<a href="../commin/chazhao.jsp"><input type="submit" value="查找 " /></a>
				</form>
			</div>
			</div>
<div id="Content">
<%
/*
读取名为uname的Cookie!
如果为空显示：""
如果不为空显示：Cookie的值
*/
String uname = "";
Cookie[] cs = request.getCookies();//获取请求中所有的cookie
if(cs != null) {// 如果存在cookie
	for(Cookie c : cs) {//循环遍历所有的cookie
		if("uname".equals(c.getName())) {//查找名为uname的cookie
			uname = c.getValue();//获取这个cookie的值，给uname这个变量
		}
	}
}
%>
<%
String msg1 = "";
String msg2 = (String) request.getAttribute("msg");//获取request域中的msg
if(msg2!=null){
msg1 = msg2;
}
 %>
<center>
<form action="/mypestroe/mypetstroe_Servlet/LoginServlet" method="post">		
&nbsp; &nbsp;&nbsp;用&nbsp;&nbsp;&nbsp;户&nbsp;&nbsp;&nbsp;名：<input type="text" name="username" value=<%=uname %>/><br/>
	 &nbsp;&nbsp;密 &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码：<input type="password" name="password" /><br/>
	<font color = "red"><%=msg1 %></font><br>
	<input type="submit" value="登陆"/>
	<input type="reset" value="取消" >
</form>
</center>
</div>
  </body>
</html>
<%@include file="../common/IncludeBottom.jsp"%>